package com.yanqu.road.entity.activity.evefeast.config;

import com.yanqu.road.utils.string.StringUtils;

import java.util.List;

/**
 * 祝酒词配置信息
 */
public class EveFeastBuffInfo {
    private int buffId;
    private int buffType;
    private List<Integer> buffParams;

    public EveFeastBuffInfo(int buffId, int buffType, String buffParams) {
        this.buffId = buffId;
        this.buffType = buffType;
        List<Integer> list = StringUtils.stringToIntegerList(buffParams, "\\|");
        this.buffParams = list;
    }

    public int getBuffId() {
        return buffId;
    }

    public int getBuffType() {
        return buffType;
    }

    public List<Integer> getBuffParams() {
        return buffParams;
    }

    public int getBuffParam(int index) {
        if (index < 0 || buffParams.size() <= index) {
            return 0;
        }
        return buffParams.get(index);
    }
}
